﻿using System;
using System.IO;
using System.Windows.Forms;

namespace ElectronicWMSA.List.Second
{
    class ErrorLog
    {
        public static void ErrorLogInfo(string Info)
        {
            string ErrPath = AppDomain.CurrentDomain.BaseDirectory;
            if (!Directory.Exists(ErrPath))
            {
                Directory.CreateDirectory(ErrPath);
            }
            using (StreamWriter sw = new StreamWriter(Application.StartupPath + "\\LOG.txt", true))
            {
                sw.WriteLine("时间:" + DateTime.Now.ToString());
                sw.WriteLine(Info);
                sw.WriteLine("---------------------------------------------------------------------------------------------------");
                sw.Close();
                sw.Dispose();
            }
        }
    }
}
